.history-list {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;

  &__status {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    
    &-icon {
      font-size: 14px;
      
      &--connected {
        color: #52c41a;
      }
      
      &--disconnected {
        color: #ff4d4f;
      }
    }
  }

  &__error {
    margin-top: 8px;
    
    &-text {
      font-size: 12px;
    }
  }

  &__header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
  }

  &__new-btn {
    height: 44px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
    
    &:hover {
      box-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
      transform: translateY(-1px);
    }
  }

  &__content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    
    &::-webkit-scrollbar {
      width: 6px;
    }
    
    &::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 3px;
    }
    
    &::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      border-radius: 3px;
      
      &:hover {
        background: #a8a8a8;
      }
    }
  }

  &__empty {
    padding: 40px 20px;
    text-align: center;
    
    &-tip {
      font-size: 12px;
      margin-top: 8px;
    }
  }

  &__conversations {
    .ant-list-item {
      padding: 0;
      margin-bottom: 8px;
      border: none;
    }
  }

  &__conversation {
    cursor: pointer;
    transition: all 0.2s ease;
    
    &:hover {
      transform: translateY(-1px);
    }
    
    &--active {
      .history-list__conversation-card {
        border-color: #1890ff;
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
        
        .ant-card-body {
          background: #f6f9ff;
        }
      }
    }
    
    &-card {
      border-radius: 8px;
      transition: all 0.2s ease;
      
      .ant-card-actions {
        border-top: 1px solid #f0f0f0;
        background: #fafafa;
        
        li {
          margin: 0;
          
          &:not(:last-child) {
            border-right: 1px solid #f0f0f0;
          }
        }
      }
    }
    
    &-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 8px;
    }
    
    &-title {
      flex: 1;
      font-size: 14px;
      line-height: 1.4;
      margin-right: 8px;
    }
    
    &-badges {
      display: flex;
      gap: 4px;
      flex-shrink: 0;
    }
    
    &-preview {
      margin-bottom: 8px;
    }
    
    &-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }

  &__message-count {
    .ant-badge-count {
      background: #1890ff;
      font-size: 10px;
      height: 16px;
      line-height: 16px;
      min-width: 16px;
      padding: 0 4px;
    }
  }

  &__pending-count {
    .ant-badge-count {
      font-size: 10px;
      height: 16px;
      line-height: 16px;
      min-width: 16px;
      padding: 0 4px;
    }
  }

  &__preview-text {
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  &__preview-icon {
    font-size: 12px;
    color: #8c8c8c;
    flex-shrink: 0;
  }

  &__date {
    font-size: 11px;
  }

  &__table-count {
    font-size: 11px;
  }

  &__delete-btn {
    color: #ff4d4f;
    
    &:hover {
      color: #ff7875;
      background: #fff2f0;
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .history-list {
    &__header {
      padding: 12px;
    }
    
    &__new-btn {
      height: 40px;
    }
    
    &__conversation {
      &-title {
        font-size: 13px;
      }
      
      &-preview {
        .history-list__preview-text {
          font-size: 11px;
        }
      }
    }
  }
}